package com.example.demo.service.impl;

import com.example.demo.dao.buisnessDAO;
import com.example.demo.model.buisness;
import com.example.demo.model.dish;
import com.example.demo.service.buisnessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class buisnessServiceImpl implements buisnessService {

    @Autowired
    private buisnessDAO buisnessDAO;
    @Override
    public List<buisness> getAllBuisness() {
        return buisnessDAO.listAllBuisness();
    }

    @Override
    public int add(buisness buisness) {
        return buisnessDAO.add(buisness);
    }

    @Override
    public int update(buisness buisness) {
        return buisnessDAO.update(buisness);
    }

    @Override
    public int delete(int id) {
        return buisnessDAO.delete(id);
    }

    @Override
    public buisness findByBuisnessName(String BuisnessName) {
        return buisnessDAO.findByBuisnessName(BuisnessName);
    }
}
